﻿#region Copyrights Notice
//©2009 Microsoft Corporation.  All rights reserved.
#endregion

using System.Data;
using System.Data.Common;
using Microsoft.Practices.EnterpriseLibrary.Data;

namespace Microsoft.CISG.BitlockerRecovery.DL
{
    public static class LogErrorsDL
    {
        public static void InsertErrorLog(string location, string description)
        {
            Database db = DatabaseFactory.CreateDatabase("BitDBSQL");
            string sqlCommand = "usp_UpdateLogs";
            DbCommand dbCommand = db.GetStoredProcCommand(sqlCommand);
            db.AddInParameter(dbCommand, "@EventType", DbType.String, location);
            db.AddInParameter(dbCommand, "@Description", DbType.String, description);
            db.ExecuteNonQuery(dbCommand);
        }

    }
}
